<%@ include file="/WEB-INF/views/jsp/include/include.jsp"%>
<html>
<head>
<title>Hand In Hand</title>
<%@ include file="/WEB-INF/views/jsp/include/head.jsp"%>
</head>

<body>
	<%@ include file="/WEB-INF/views/jsp/include/header.jsp"%>
	<%@ include file="/WEB-INF/views/jsp/include/navigator.jsp"%>

	<div class="container-fluid">
		<div id="center" class="col-xs-6">
			<c:if test="${not empty userWallViewForm.userWallElements }">
				<div
					style="border: 1px solid #b78f41 !important; border-radius: 10px; padding-bottom: 10px; padding-top: 10px;"
					class="col-xs-12">
					<c:forEach var="element" items="${userWallViewForm.userWallElements}">

						<div
							style="border: 1px solid #898787 !important; border-radius: 10px; margin-top: 4px; margin-bottom: 4px; padding-bottom: 3px; padding-top: 3px;"
							class="col-xs-12">

							<c:if
								test="${element.getClass().name == 'com.group9.handinhand.service.so.EventSO'}">
								<!-- 									<div style="border: 1px solid #898787 !important; border-radius:10px; margin-top: 4px; margin-bottom: 4px; padding-bottom: 3px;padding-top: 3px;" class="col-xs-12"> -->
								<img style="margin-top: 5px;" class="col-xs-2"
									src=<c:url value="/resources/images/maleicon.jpg"/>>
								<span> <a> ${element.creator.name }
										${element.creator.surname }</a> 's event <br>
								</span>
								<a class="list-group-item-warning"
									href="<spring:url value='/communities/${element.community.id}/events/${element.id}'></spring:url>">
									${element.name} </a>
								<br>
								<div
									style="border: 1px solid #898787 !important; border-radius: 10px; margin-bottom: 4px; padding-bottom: 3px; padding-top: 3px;"
									class="col-xs-10 col-xs-offset-2">${element.description }
								</div>
							</c:if>
							<c:if
								test="${element.getClass().name == 'com.group9.handinhand.service.so.RequestSO'}">
								<!-- 									<div style="border: 1px solid #898787 !important; border-radius:10px; margin-top: 4px; margin-bottom: 4px; padding-bottom: 3px;padding-top: 3px;" class="col-xs-12"> -->
								<img style="margin-top: 5px;" class="col-xs-2"
									src=<c:url value="/resources/images/maleicon.jpg"/>>
								<span> <a> ${element.creator.name }
										${element.creator.surname }</a> 's request <br>
								</span>
								<a class="list-group-item-warning"
									href="<spring:url value='/communities/${element.community.id}/requests/${element.id}'></spring:url>">
									${element.name} </a>
								<br>
								<div
									style="border: 1px solid #898787 !important; border-radius: 10px; margin-bottom: 4px; padding-bottom: 3px; padding-top: 3px;"
									class="col-xs-10 col-xs-offset-2">${element.description }
								</div>
								<!-- 									</div> -->
							</c:if>
							<c:if
								test="${element.getClass().name == 'com.group9.handinhand.service.so.OfferSO'}">
								<!-- 									<div style="border: 1px solid #898787 !important; border-radius:10px; margin-top: 4px; margin-bottom: 4px; padding-bottom: 3px;padding-top: 3px;" class="col-xs-12"> -->
								<img style="margin-top: 5px;" class="col-xs-2"
									src=<c:url value="/resources/images/maleicon.jpg"/>>
								<span> <a> ${element.creator.name }
										${element.creator.surname }</a> 's offer <br>
								</span>
								<a class="list-group-item-warning"
									href="<spring:url value='/communities/${element.community.id}/offers/${element.id}'></spring:url>">
									${element.name} </a>
								<br>
								<div
									style="border: 1px solid #898787 !important; border-radius: 10px; margin-bottom: 4px; padding-bottom: 3px; padding-top: 3px;"
									class="col-xs-10 col-xs-offset-2">${element.description }
								</div>
								<!-- 									</div> -->
							</c:if>
							<c:if
								test="${element.getClass().name == 'com.group9.handinhand.service.so.CommunityPostSO'}">
								<!-- 									<div style="border: 1px solid #898787 !important; border-radius:10px; margin-top: 4px; margin-bottom: 4px; padding-bottom: 3px;padding-top: 3px;" class="col-xs-12"> -->
								<img style="margin-top: 5px;" class="col-xs-2"
									src=<c:url value="/resources/images/maleicon.jpg"/>>
								<span> <a> ${element.user.name }
										${element.user.surname }</a> 's post
								</span>
								<br>
										 ${element.context}
<!-- 									</div> -->
							</c:if>
						</div>

					</c:forEach>
			</c:if>
		</div>
	</div>
	<hr>

	<%@ include file="/WEB-INF/views/jsp/include/footer.jsp"%>

</body>
</html>